/**
 * 
 */
package com.feonix.designPattern.composite.sample;

/**
 * @CopyRight (c)1993-2017
 * @Project common_practice
 * @Comments 请输入该类的描述
 * @NameSpace com.feonix.designPattern.composite.sample
 * @Author Feonixzw
 * @CreateDate 2018年2月6日
 */
public class File extends Entry {

	public String name;

	public int size;

	public File(String name, int size) {
		super();
		this.name = name;
		this.size = size;
	}

	@Override
	public String getName() {
		return this.name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.feonix.designPattern.composite.sample.Entry#getSize()
	 */
	@Override
	public int getSize() {
		return this.size;
	}

	@Override
	protected void printList(String prefix) {
		System.out.println(prefix + "/" + this.toString());

	}

}
